<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>时钟</title>
    <link rel="icon" href="../img/logo.png" type="image/x-icon">
    <link rel="stylesheet" href="css/clock.css">
    <script src="https://cdn.staticfile.org/vue/2.4.2/vue.min.js"></script>
</head>

<body>
    <!-- 整体框架 -->
    <div id="clock">
        <!-- 选择按钮 -->
        <div>
            <a class="cb" v-bind:class="{'active':color=='blue'}" v-on:click="color='blue'">蓝色</a>
            <a class="cr" v-bind:class="{'active':color=='red'}" v-on:click="color='red'">红色</a>
            <a class="cg" v-bind:class="{'active':color=='green'}" v-on:click="color='green'">绿色</a>
            <a class="cbk" v-bind:class="{'active':color=='black'}" v-on:click="color='black'">黑色</a>
        </div>
        <!-- 时钟 -->
        <div class="time">
            <div v-if="color=='blue'">
                <p class=" blue">{{date}}</p>
                <p class="blue" style="font-size: 38px;">{{time}}</p>
            </div>
            <div v-if="color=='red'">
                <p class="red">{{date}}</p>
                <p class="red" style="font-size: 38px;">{{time}}</p>
            </div>
            <div v-if="color=='green'">
                <p class="green">{{date}}</p>
                <p class="green" style="font-size: 38px;">{{time}}</p>
            </div>
            <div v-if="color=='black'">
                <p class="black">{{date}}</p>
                <p class="black" style="font-size: 38px;">{{time}}</p>
            </div>
        </div>
    </div>
    <script src="js/clock.js"></script>
</body>

</html>